<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		* {
			margin: 0;
			padding: 0;
		}

		h1 {
			height: 100px;
			line-height: 100px;
			background-color: gray;
			text-align: center;
		}

		@media (width:500px) {
			h1 {
				background-color: yellow;
			}
		}

		@media (max-width:400px) {
			h1 {
				background-color: skyblue;
			}
		}

		@media (min-width:600px) {
			h1 {
				background-color: red;
			}
		}
	</style>
</head>
<body>
	<h1>新年快乐</h1>
</body>
</html>